#include "Unit.h"
#include "MoveHandler.h"
Unit::Unit()
{

}
Unit::Unit(int positionX,int positionY,int height,int width, Engine* e): Entity(positionX,positionY,height,width,e)
{
    currentFrame=1;

}

void Unit::Move()
{
    velocityX=currentMoveSpeedX;
    velocityY=currentMoveSpeedY;
	
    for(int i =0;  i<vectorEffect.size();i++)
    {
//        vectorEffect[i].move(this);
    }
	
    mh->move(this);
	weaponClip->move(velocityX, velocityY);
}
void Unit::update()
{

    this->Move();
}

Unit::~Unit(void)
{
}

void Unit::dragged(int x, int y)
{
    posRect->x=posRect->x+x;
    posRect->y=posRect->y+y;
    bodyClip->dragged(x, y);
    weaponClip->dragged(x, y);

}
